package com.main.tripplanner.persistent;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name="attraction_question")
public class AttractionQuestion extends PersistentEntity{
	private Country country;
	private Attraction bestCandidateToReplace;
	private Attraction currentAttraction;
	private int numberOfQuestionsToReplace;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	@Column(name="attraction_question_id")
	public int getId() {
		return id;
	}
	
	public void setId(int id) {
		this.id = id;
	}
	
	@ManyToOne
	@JoinColumn(name="country_id")
	public Country getCountry() {
		return country;
	}
	public void setCountry(Country country) {
		this.country = country;
	}
	
	@ManyToOne
	@JoinColumn(name="best_candidate_to_replace" , referencedColumnName="attraction_id")
	public Attraction getBestCandidateToReplace() {
		return bestCandidateToReplace;
	}
	public void setBestCandidateToReplace(Attraction bestCandidateToReplace) {
		this.bestCandidateToReplace = bestCandidateToReplace;
	}
	
	@ManyToOne
	@JoinColumn(name="current_attraction", referencedColumnName="attraction_id")
	public Attraction getCurrentAttraction() {
		return currentAttraction;
	}
	public void setCurrentAttraction(Attraction currentAttraction) {
		this.currentAttraction = currentAttraction;
	}
	
	@Column(name="number_of_question_to_replace")
	public int getNumberOfQuestionsToReplace() {
		return numberOfQuestionsToReplace;
	}
	public void setNumberOfQuestionsToReplace(int numberOfQuestionsToReplace) {
		this.numberOfQuestionsToReplace = numberOfQuestionsToReplace;
	}
	
	
}
